package com.zcoj.pojo.Dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author 剩xia的盛夏
 * @date 2023/02/24 16:16
 */
@Data
@ApiModel("")
public class Discussion implements Serializable {

    private static final long serialVersionUID = 2892248514883451461L;

    @ApiModelProperty(value = "", example = "1")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "分类id", example = "1")
    private Integer categoryId;

    @ApiModelProperty(value = "讨论标题")
    private String title;

    @ApiModelProperty(value = "讨论简介")
    private String description;

    @ApiModelProperty(value = "讨论内容")
    private String content;

    @ApiModelProperty(value = "关联题目id", example = "1")
    private Integer pid;

    @ApiModelProperty(value = "发表者id", example = "1")
    private Integer uid;

    @ApiModelProperty(value = "发表者用户名")
    private String author;

    @ApiModelProperty(value = "发表讨论者头像")
    private String faceUrl;

    @ApiModelProperty(value = "发表者角色")
    private String role;

    @ApiModelProperty(value = "浏览数量", example = "1")
    private Integer viewNum;

    @ApiModelProperty(value = "点赞数量", example = "1")
    private Integer likeNum;

    @ApiModelProperty(value = "优先级，是否置顶 0否 1是")
    private Boolean topPriority;

    @ApiModelProperty(value = "评论数量", example = "1")
    private Integer commentNum;

    @ApiModelProperty(value = "是否封禁该讨论 0否 1是", example = "1")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}
